﻿using System.Collections.Generic;
using Pap.Data;
using Pap.Data.Abstraction.Utils;
using Pap.Web.Utils;

namespace Pap.Web.Modules.Loan.ViewModel
{
    /// <summary>
    /// 
    /// </summary>
    public class GridPrintViewModel : IViewModel
    {
        /// <summary>
        /// 
        /// </summary>
        IDatabase _DB;
        /// <summary>
        /// Initializes a new instance of the <see cref="GridPrintViewModel"/> class.
        /// </summary>
        /// <param name="db">The db.</param>
        public GridPrintViewModel(IDatabase db)
        {
            _DB = db;
        }

        /// <summary>
        /// Gets all installments.
        /// </summary>
        /// <returns></returns>
        public IEnumerable<ICustomerLoan> GetAllInstallments()
        {
            return _DB.CustomerLoans;
        }
    }
}
